import { format } from "date-fns";

import zhCN from "date-fns/locale/zh-CN";

export default (value, formatStr = "yyyy-MM-dd HH:mm:ss", _locale) =>
  format(value, formatStr, {
    locale: _locale || zhCN,
  });
